package com.chaoyi.service;

import com.chaoyi.doman.koreanvideo.*;
import com.chaoyi.model.KoreanVideo;
import com.chaoyi.model.KoreanVideoDetail;

import javax.servlet.http.Part;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @author xuanqicheng
 * @create 2018-10-下午2:04
 */
public interface KoreanVideoService {
    /**
     * 上传图片
     * @param uploadFile
     * @return
     */
    String uploadClassifyImg2WSCDN(Part uploadFile) throws Exception;

    /**
     * 上传视频
     * @param uploadFile
     * @return
     */
    String uploadClassifyVideo2WSCDN(Part uploadFile) throws IOException, Exception;

    /**
     * 添加
     * @param entity
     * @return
     */
    int addVideoSave(KoreanVideo entity);

    /**
     * 总条数
     * @return
     */
    int findCount(KoreanVideo koreanVideo);

    /**
     * 分页信息
     * @param offset
     * @param limit
     * @return
     */
    List<KoreanVideo> findList(int offset, int limit,KoreanVideo koreanVideo);

    /**
     * 查找一条
     * @param id
     * @return
     */
    KoreanVideo findVideoOne(int id);

    /**
     * 修改数据
     * @param entity
     * @return
     */
    int edit(KoreanVideo entity);

    /**
     * 删除数据
     * @param id
     * @return
     */
    int deleteVideo(int id);

    /**
     * 查询电影类型
     * @param koreanVideoClassificationQueryCondition
     * @return
     */
    List<KoreanVideoOutput> getVideoClassificationList(KoreanVideoClassificationQueryCondition koreanVideoClassificationQueryCondition);

    /**
     * 查询韩国在线影院列表
     * @param koreanVideoQueryCondition
     * @return
     */
    List<KoreanOnlineVideoOutput> getKoreanOnlineVideoList(KoreanVideoQueryCondition koreanVideoQueryCondition);

    /**
     * 查看正片地址
     * @param id
     * @return
     */
    Map<String,String> getSee(String id);

    /**
     * 查看试看地址
     * @param id
     * @return
     */
    Map<String,String> getTryToSee(String id);

    /**
     * 查询视频详细信息
     * @param id
     * @return
     */
    KoreanVideoDetail selectKoreanVideoDetailById(int id);

    /**
     * 添加详情
     * @param entity
     * @return
     */
    int saveDetail(KoreanVideoDetail entity);

    /**
     * 修改详情
     * @param entity
     * @return
     */
    int editDetail(KoreanVideoDetail entity);

    KoreanVideoDetailOutput getDetail(String id);

}
